<template>

  <div class="my-shop" >
    <el-tabs type="border-card">
      <el-tab-pane label="我的店铺">
        <v-shop></v-shop>
      </el-tab-pane>
      <el-tab-pane label="修改密码">
        <v-password></v-password>
      </el-tab-pane>
    </el-tabs>
  </div>

</template>

<script>
  import vShop from './Shop.vue';
  import vPassword from './Password.vue';
  export default {

    data: function () {

      return {

      }
    },
    components:{
        vShop,vPassword
    },
    methods: {
       onSubmit() {
         console.log('submit!');
       },
       handleAvatarSuccess(res, file) {
         this.imageUrl = URL.createObjectURL(file.raw);
       },
       beforeAvatarUpload(file) {
         const isLt2M = file.size / 1024 / 1024 < 2;


         if (!isLt2M) {
           this.$message.error('上传头像图片大小不能超过 2MB!');
         }
         return isLt2M;
       }
   }


}
</script>

<style scoped>
.my-shop{
  padding-top: 20px;
}
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #20a0ff;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
  }
  .el-tabs__item{
    width: initial;
  }

  .is-active{
    color: #e51b26!important;
  }
</style>
